<?php

namespace App\Modules\Bill\Models;


use Illuminate\Database\Eloquent\Model;

/**
 * Class Graphic 图文咨询
 * @package App\Modules\Task\Models
 */
class Bill extends Model
{
    protected $table = 'bill';

    protected $fillable = ['id', 'user_id', 'bill_no', 'trade_no', 'source', 'type', 'amount', 'created_at', 'updated_at', 'status'];

    static function getList($param)
    {
        return self::where('status','>=',0)->paginate($param['size']);
    }

    static function getDetails($id)
    {
        return self::where('id',$id)->first();
    }

    static function add($param)
    {
        // TODO check
        return self::create($param);
    }
}